import { CQXG_STATE, LRKPB_STATE } from '../common/Format';

// tendersRules: true // 招标结果正确
const updateStateConfig = (dataIlInfo, packList, formType, tendersRules): Record<string, any> => {
  let params: Record<string, any> = {
    showModal: false,
    updatePayload: {},
    tipText: '',
    showNextBtn: false,
  };

  /** 招标文件澄清修改 */
  if (formType == 'source-clarify' && dataIlInfo?.state == CQXG_STATE()) {
    params['showModal'] = true;
    params['updatePayload'] = {
      ids: packList?.map((item) => item?.id)?.join(','),
      state: LRKPB_STATE(),
    };
    // params['tipText'] = <div>请确认所有标包信息是否准确无误？</div>;
    params['tipText'] = (
      <div>
        <p>请确认</p>
        <p>标包【招标文件成澄清修改】和【组建评标委员会】信息无误！</p>
        <p>此操作不可恢复！</p>
      </div>
    );
    params['showNextBtn'] = true;
  }
  return params;
};

export { updateStateConfig };
